package com.iflytek.day14.p03;

//测试类
public class Test {
    public static void main(String[] args) {
        //创建对象并调用方法
        Person p1 = new Person("老王", 30);
        Dog d = new Dog(2, "黑");
        p1.keepPet(d, "骨头");


        Person p2 = new Person("老李", 25);
        Cat c = new Cat(3, "灰");
        p2.keepPet(c, "鱼");


        //创建饲养员的对象
        Person p3 = new Person("老王", 30);
        Dog d3 = new Dog(2, "黑");
        Cat c3 = new Cat(3, "灰");
        p3.keepPet(d3, "骨头");
        p3.keepPet(c3, "鱼");

    }
}